<?php

namespace app\admin\model;

use app\admin\model\service\Agent;
use think\Model;


class Company extends Model
{





    // 表名
    protected $name = 'company';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    public function serviceAgent()
    {
        return $this->hasOne(Agent::class, 'id', 'service_agent_id');
    }
    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id');
    }










}
